<legend>Services in Hungary</legend>
<table width="100%" class="formtable">
    <tr>
        <td>
        <<inputchoice value="`$serviceprofile.service_type`" title="Choose category" id="service_id" name="service_type" itemservice="{servicename : 'getavailableservices', pagename : 'services'}">>
        </td>
    </tr>
    <tr>
        <td><<inputtextarea cols=10 rows=80 value="`$serviceprofile.service_description`" title="Service description" name="service_description" class="width500">></td>
    </tr>
</table>

<p>
<b>I would like to </b><Br>
<table>
<<if ($sponsor.spn_service_rotator.status == "payed")>>
<tr><td>place a banner ad</td><td class="sponsor_payed">PAYED</td></tr>
<<else if ($sponsor.spn_service_rotator.status == "ordered")>>
<tr><td>place a banner ad</td><td class="sponsor_ordered">ORDERED</td></tr>
<<else if ($sponsor.spn_service_rotator.status == "waiting")>>
<tr><td>place a banner ad</td><td class="sponsor_waiting">WAITING</td></tr>
<<else>>
<tr><td><input onclick="checkboxClicked(this, 30000);" class="checkbox row_allower sponsor" type="checkbox" name="banner_ad"></td><Td>place a banner ad</td><td>for <input type="text" name="banner_ad_month" class="multiplier month" prev="<<$banner_ad_months>>" value="<<$banner_ad_months>>" base="30000"> month(s)</td><td><span ref="banner_ad_month" class="sum"></span> HUF</td><td></td></tr>
<</if>>

<<if ($sponsor.spn_service_selection.status == "payed")>>
<tr><td>sponsor selected topic</td><td class="sponsor_payed">PAYED</td></tr>
<<else if ($sponsor.spn_service_selection.status == "ordered")>>
<tr><td>sponsor selected topic</td><td class="sponsor_ordered">ORDERED</td></tr>
<<else if ($sponsor.spn_service_selection.status == "waiting")>>
<tr><td>sponsor selected topic</td><td class="sponsor_waiting">WAITING</td></tr>
<<else>>
<tr><td><input onclick="checkboxClicked(this, 20000);" class="checkbox row_allower sponsor" type="checkbox" name="topic_sponsor"></td><Td>sponsor selected topic</td><td>for <input type="text" name="topic_sponsor_month" class="multiplier month" prev="<<$topic_sponsor_months>>" value="<<$topic_sponsor_months>>" base="20000"> month(s)</td><td><span ref="topic_sponsor_month" class="sum"></span> HUF</td><td><<fileuploader req_width=728 req_height=90 uploadfn="uploadSponsorLogo" title="add banner" name="topicsponsor_id" imgwidth="150">></td></tr>
<</if>>

<<if ($sponsor.spn_service_logo.status == "payed")>>
<tr><td>sponsor selected topic</td><td class="sponsor_payed">PAYED</td></tr>
<<else if ($sponsor.spn_service_logo.status == "ordered")>>
<tr><td>sponsor selected topic</td><td class="sponsor_ordered">ORDERED</td></tr>
<<else if ($sponsor.spn_service_logo.status == "waiting")>>
<tr><td>sponsor selected topic</td><td class="sponsor_waiting">WAITING</td></tr>
<<else>>
<tr><td><input onclick="checkboxClicked(this, 10000);" class="checkbox row_allower sponsor" type="checkbox" name="logo_ad"></td><Td>place a logo ad</td><td>for <input type="text" name="logo_ad_month" class="multiplier month" prev="<<$logo_ad_months>>" value="<<$logo_ad_months>>" base="10000"> month(s)</td><td><span class="sum" ref="logo_ad_month"></span> HUF</td><td><<fileuploader uploadfn="uploadSponsorLogo" title="add logo" req_width=182 req_height=90 name="logo_id">></tr>
<</if>>

</table>
</p>
<<if ($sponsor.spn_service_logo.status != "payed" && $sponsor.spn_service_logo.status != "waiting" && $sponsor.spn_service_logo.status != "ordered")>>
<table>
<tr><td><input onclick="checkboxClicked()" class="checkbox extra" type="checkbox" name="logo_insert"></td><Td>logo ad is free for 1 month if you insert our link on your Website</td></tr>
</table>
<</if>>
<p>

<<fileuploader chgtitle="<<$lng.changebanner>>" req_minwidth=710 req_minheight=90 req_width=732 req_height=120 uploadfn="uploadSponsorLogo" value="<<$companyprofile.rotator_id>>" title="add banner" name="banner_id">>

</p><p>
<table>
<tr><td><input class="checkbox" type="checkbox" name="accept_tac"></td><td>Yes, I understand and agree with the <a href="index.php?choice=termsofuse" target="_blank">Terms and Conditions</a> of the Site.</td></tr>
<tr><td colspan="2"><<$lng.sendorder>></td></tr>
</table>

<p>
<<$lng.longterm>>
</p>
<table>
<tr><td>
Total amount:
</td><td width="150px;">
<div style="background-color:#DEDEDE;width:auto;"><div style="display:inline;" id="amount"></div> HUF</div>
</td><td>
<div style="display:inline;" id="amount_eur"></div> EUR
</td><td>
<div style="display:inline;" id="amount_usd"></div> USD
</td><td>
<div style="padding-left:1cm;">EUR and USD prices are for information purposes only</div>
</td><td>
<input type="text" name="discount" class="extra discount" style="width:130px;position:relative;top:8px;" onchange="recalculateAmount()">
</td></tr>
</table>

</p>
<input type="hidden" name="sponsoration_changed" value="0">
    <<jqbutton type="submit" title="save service" style="width:180px;" onclick="submitService('profile', 'Saving service profile, please wait...', this); return false;">>

<script>
function submitService(formName, waitMsg, buttonItem) {
    if (sponsorationChanged) { jQuery("input[name='sponsoration_changed']").val(1); } else { jQuery("input[name='sponsoration_changed']").val(0); }
    multiform_saveCurrentTab(jQuery("form[name='profile']"), 1, waitMsg, buttonItem);
}

jQuery("input[type='checkbox'].row_allower").allower({
    type : "row"
});

jQuery(".fileuploader").fileuploader();

var freeaugust = {
    aftercalc : function(result, base, multiplier) {
        var d = new Date();
        var discount = d.getFullYear() == 2012 && d.getMonth() <= 6;
        if (discount) {
            if (multiplier == 1) { return "Free in August 2012"; }
            return (result - base);
        }
        return result;
    }
};
jQuery("input.multiplier").multiplier(freeaugust);

</script>
